<script setup>
import icon from "@/utils/icon.js";

const emit = defineEmits(["search", "reset"]);

const search = () => {
  emit("search");
};
const reset = () => {
  emit("reset");
};
</script>

<template>
  <div class="button-group">
    <slot />
    <a-space>
      <a-button type="primary" @click="search">
        <icon type="SearchOutlined" />
        搜索
      </a-button>
      <a-button @click="reset">
        <icon type="ReloadOutlined" />
        重置</a-button
      >
    </a-space>
  </div>
</template>

<style scoped lang="scss">
.button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}
</style>
